package cn.zjutleo.village_server.controller;

import cn.zjutleo.village_server.annotation.OperationLog;
import cn.zjutleo.village_server.annotation.RequestLimit;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: 张坤
 * @DateTime: 2022/1/14 15:14
 * @Description: 该类用于 TODO
 */
@Api(tags = "访问次数限制切面类测试")
@RestController
@RequestMapping("/RequestLimitTest")
public class testRequestLimitController {

    private static final String MODULE_NAME = "访问次数限制切面类module";
    @OperationLog(module = MODULE_NAME, method = "访问次数限制切面类测试", ignoreParameters = false)
    @RequestLimit(time = 60,amount = 5)
    @GetMapping("/test1")
    public boolean testRequestLimit(){
        return true;
    }
}
